package com.hello.system.service.impl;

import java.util.List;
import com.hello.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hello.system.mapper.ActivityRepliesMapper;
import com.hello.system.domain.ActivityReplies;
import com.hello.system.service.IActivityRepliesService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 活动回复评论Service业务层处理
 * 
 * @author hello
 * @date 2025-10-29
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class ActivityRepliesServiceImpl extends ServiceImpl<ActivityRepliesMapper, ActivityReplies> implements IActivityRepliesService 
{
    private final ActivityRepliesMapper activityRepliesMapper;

    /**
     * 查询活动回复评论
     * 
     * @param replyId 活动回复评论主键
     * @return 活动回复评论
     */
    @Override
    public ActivityReplies selectActivityRepliesByReplyId(Long replyId)
    {
        return activityRepliesMapper.selectActivityRepliesByReplyId(replyId);
    }

    /**
     * 查询活动回复评论列表
     * 
     * @param activityReplies 活动回复评论
     * @return 活动回复评论
     */
    @Override
    public List<ActivityReplies> selectActivityRepliesList(ActivityReplies activityReplies)
    {
        return activityRepliesMapper.selectActivityRepliesList(activityReplies);
    }

    /**
     * 新增活动回复评论
     * 
     * @param activityReplies 活动回复评论
     * @return 结果
     */
    @Override
    public int insertActivityReplies(ActivityReplies activityReplies)
    {
        activityReplies.setCreateTime(DateUtils.getNowDate());
        return activityRepliesMapper.insertActivityReplies(activityReplies);
    }

    /**
     * 修改活动回复评论
     * 
     * @param activityReplies 活动回复评论
     * @return 结果
     */
    @Override
    public int updateActivityReplies(ActivityReplies activityReplies)
    {
        activityReplies.setUpdateTime(DateUtils.getNowDate());
        return activityRepliesMapper.updateActivityReplies(activityReplies);
    }


    /**
     * 批量删除活动回复评论
     * 
     * @param replyIds 需要删除的活动回复评论主键
     * @return 结果
     */
    @Override
    public int deleteActivityRepliesByReplyIds(Long[] replyIds)
    {
        return activityRepliesMapper.deleteActivityRepliesByReplyIds(replyIds);
    }

    /**
     * 删除活动回复评论信息
     * 
     * @param replyId 活动回复评论主键
     * @return 结果
     */
    @Override
    public int deleteActivityRepliesByReplyId(Long replyId)
    {
        return activityRepliesMapper.deleteActivityRepliesByReplyId(replyId);
    }
}
